import 'dart:convert' show json;

class User {
  bool is_vip;
  String id;
  String personal_page;
  String profile_image;
  String qq_uid;
  String qzone_uid;
  String sex;
  String total_cmt_like_count;
  String username;
  String weibo_uid;

  User.fromParams(
      {this.is_vip,
      this.id,
      this.personal_page,
      this.profile_image,
      this.qq_uid,
      this.qzone_uid,
      this.sex,
      this.total_cmt_like_count,
      this.username,
      this.weibo_uid});

  User.fromJson(jsonRes) {
    is_vip = jsonRes['is_vip'];
    id = jsonRes['id'];
    personal_page = jsonRes['personal_page'];
    profile_image = jsonRes['profile_image'];
    qq_uid = jsonRes['qq_uid'];
    qzone_uid = jsonRes['qzone_uid'];
    sex = jsonRes['sex'];
    total_cmt_like_count = jsonRes['total_cmt_like_count'];
    username = jsonRes['username'];
    weibo_uid = jsonRes['weibo_uid'];
  }

  @override
  String toString() {
    return '{"is_vip": $is_vip,"id": ${id != null ? '${json.encode(id)}' : 'null'},"personal_page": ${personal_page != null ? '${json.encode(personal_page)}' : 'null'},"profile_image": ${profile_image != null ? '${json.encode(profile_image)}' : 'null'},"qq_uid": ${qq_uid != null ? '${json.encode(qq_uid)}' : 'null'},"qzone_uid": ${qzone_uid != null ? '${json.encode(qzone_uid)}' : 'null'},"sex": ${sex != null ? '${json.encode(sex)}' : 'null'},"total_cmt_like_count": ${total_cmt_like_count != null ? '${json.encode(total_cmt_like_count)}' : 'null'},"username": ${username != null ? '${json.encode(username)}' : 'null'},"weibo_uid": ${weibo_uid != null ? '${json.encode(weibo_uid)}' : 'null'}}';
  }
}
